package com.smartstate.dataManagement.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;

@Data
@Entity
@TableName("team")
public class Team {
    @Id
    private  String id;
    private  String staffName;
    private  String team;
    private  String teamType;
    private  String time;
    private  String groupType;
    private  Date createTime;
    private  String createUser;
    private  Date updateTime;
    private  String updateUser;


    @Transient
    @TableField(exist = false)
    private String  glTeam;
    private String  glTeamStaffName;
    private String  dqTeam;
    private String  dqTeamStaffName;
    private String  ntTeam;
    private String  ntTeamStaffName;

    public Team(){}
    public Team(TeamBuilder teamBuilder){
        this.id=teamBuilder.id;
        this.staffName=teamBuilder.staffName;
        this.team=teamBuilder.team;
        this.teamType=teamBuilder.teamType;
        this.time=teamBuilder.time;
        this.groupType=teamBuilder.groupType;
        this.createTime=teamBuilder.createTime;
        this.createUser=teamBuilder.createUser;
        this.updateTime=teamBuilder.updateTime;
        this.updateUser=teamBuilder.updateUser;
    }

    public static  class TeamBuilder{
        private  String id;
        private  String staffName;
        private  String team;
        private  String teamType;
        private  String time;
        private  String groupType;
        private  Date createTime;
        private  String createUser;
        private  Date updateTime;
        private  String updateUser;

        private String  glTeam;
        private String  glTeamStaffName;
        private String  dqTeam;
        private String  dqTeamStaffName;
        private String  ntTeam;
        private String  ntTeamStaffName;

        public TeamBuilder setGlTeam(String glTeam) {
            this.glTeam = glTeam;
            return  this;
        }

        public TeamBuilder setGlTeamStaffName(String glTeamStaffName) {
            this.glTeamStaffName = glTeamStaffName;
            return  this;
        }

        public TeamBuilder setDqTeam(String dqTeam) {
            this.dqTeam = dqTeam;
            return  this;
        }

        public TeamBuilder setDqTeamStaffName(String dqTeamStaffName) {
            this.dqTeamStaffName = dqTeamStaffName;
            return  this;
        }

        public TeamBuilder setNtTeam(String ntTeam) {
            this.ntTeam = ntTeam;
            return this;
        }

        public TeamBuilder setNtTeamStaffName(String ntTeamStaffName) {
            this.ntTeamStaffName = ntTeamStaffName;
            return  this;
        }

        public TeamBuilder setId(String id) {
            this.id = id;
            return  this;
        }
        public TeamBuilder setStaffName(String staffName) {
            this.staffName = staffName;
            return  this;
        }

        public TeamBuilder setTeam(String team) {
            this.team = team;
            return this;
        }
        public TeamBuilder setTeamType(String teamType) {
            this.team = team;
            return this;
        }

        public TeamBuilder setTime(String time) {
            this.time = time;
            return this;
        }

        public TeamBuilder setGroupType(String groupType) {
            this.groupType = groupType;
            return  this;
        }

        public TeamBuilder setCreateTime(Date createTime) {
            this.createTime = createTime;
            return  this;
        }

        public TeamBuilder setCreateUser(String createUser) {
            this.createUser = createUser;
            return  this;
        }

        public TeamBuilder setUpdateTime(Date updateTime) {
            this.updateTime = updateTime;
            return  this;
        }

        public TeamBuilder setUpdateUser(String updateUser) {
            this.updateUser = updateUser;
            return  this;
        }
        public  Team getTeam(){
            return  new Team(this);
        }
    }


}
